<%@ page language="java"   pageEncoding="UTF-8"%>
<%@ page import="net.sapfree.user.vo.UserVO"%>
<%@ page import="net.sapfree.core.db.RecordSet"%>
<%@ page import="net.sapfree.core.db.Record"%>
<%@ page import="net.sapfree.article.ArticleHandler"%>
<%@ page import="net.sapfree.core.util.CutHtml"%>
<%@ page import="net.sapfree.common.Constants"%>
<%@ taglib uri="/WEB-INF/sapfree-info.tld" prefix="sap" %>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";

String personuuid = request.getAttribute("personuuid")==null?"":request.getAttribute("personuuid").toString();
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />


<title>Witbean.com | 家长与孩子共同成长</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
<link href="<%=path%>/include/styleBase/css/ostable.css" rel="stylesheet"></link>
<link href="<%=path%>/include/styleBase/css/leftPage.css" rel="stylesheet"></link>
<link href="<%=path%>/include/styleBase/css/tagStyle.css" rel="stylesheet"></link>
<link href="<%=path%>/include/styleBase/css/fontStyle.css" rel="stylesheet"></link>

<link href="<%=path%>/include/styleBase/css/headfoot.css" rel="stylesheet"></link>
<script type="text/javascript" src="<%=path%>/include/styleBase/js/jquery.js"></script>
<script type="text/javascript" src="<%=path%>/include/styleBase/js/style.js"></script>

</head>

<body>
<form name="frm" method="post">

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
	<td>
    <%//@include file="../include/jsp/top_schome.jsp"%>
    <jsp:include page="../include/jsp/top_schome.jsp" flush="true">   
    	<jsp:param  name="functionid"  value="9"/>
    </jsp:include>
    </td>
</tr>
<tr>
	<td align="center">
	
    <table border="0" cellpadding="0" cellspacing="0" width="1000" align="center" bgcolor="#FFFFFF">
	<tr><td height="20"></td></tr>
	<tr>
    	<td width="190" valign="top" align="left"><%@include file="../include/jsp/quan/topicQuanMember.jsp"%></td>
        <td width="10"></td>
        <td width="600" valign="top">
        <!--中间主信息展示区-->
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
        	<td>
            
        <tr>
        	<td>
            <table border="0" cellpadding="0" cellspacing="0" width="100%">
            <tr>
            	<td height="120" colspan="2" valign="top">
                <table border="0" cellpadding="0" cellspacing="0" width="99%">
                    	<sap:ArticleList filterQuanUuid="123" count="5">
	         			<sap:Article>
                        <tr>
                        	<td width="10"></td>
                            <td class="lightBlueBold14" colspan="2" height="30" align="left">
                                <span style="cursor:pointer;" onClick="blogDetail('<sap:write property="AI_UUID"/>')"><sap:write property="AI_TITLE"/></span>
                                &nbsp;&nbsp;
                                <span class="greyNormal12"><sap:write property="AI_PUBLISHTIME"/></span>
                                &nbsp;
                                <a href="#2011" onClick="editBlog('<sap:write property="AI_UUID"/>');"><span class="lightBlueNormal12">[编辑]</span></a>
                                <a href="#2011" onClick="deleteBlog('<sap:write property="AI_UUID"/>');"><span class="lightBlueNormal12">[删除]</span></a>
                            </td>
                            <td width="10"></td>
                        </tr>
                        <tr>
                        	<td width="10"></td>
                            <td class="blackNormal12" height="25" colspan="2" align="left">
                            作者：<span class="lightBlueBold12"><sap:write property="AI_PERSONNAME" /></span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            标签：
                            <%
                                 String articleId=(String)pageContext.getAttribute("articleId");
                                 String htmlContent=(String)pageContext.getAttribute("htmlContent");
                                 RecordSet tagRst = ArticleHandler.getTagInfoByArtId(articleId);
                                 for(int j=0;j<tagRst.size();j++){
                                    Record tagrecord = tagRst.get(j);
                                 %>
                                    <a href="#2011" onClick="seaBlogByTag('<%=tagrecord.getString("AT_TAGUUID","")%>');"><%=tagrecord.getString("AT_TAGNAME","")%></a>
                                <%}
                            %>
                            </td>
                            <td width="10"></td>
                        </tr>
                        <tr><td height="10"></td></tr>
                        
                        <tr>
                        	<td width="10"></td>
                            <td class="blackNormal12" height="25" colspan="2" align="left">
                                <!--<sap:write property="AC_CONTENT"/>-->
                                <%=CutHtml.subStringHTML(htmlContent,Constants.ARTICLE_CUT_LENGTH, "...")%>
                            </td>
                            <td width="10"></td>
                        </tr>
                        <tr><td height="10"></td></tr>
                        
                        <tr>
                        	<td width="10"></td>
                            <td class="greyNormal12" align="left" height="30">阅读（<sap:write property="AI_READCOUNT"/>）&nbsp;&nbsp;|&nbsp;&nbsp;评论（<sap:write property="AI_DISCUSSCOUNT"/>）&nbsp;&nbsp;|&nbsp;&nbsp;收藏（<sap:write property="AI_UPCOUNT"/>）</td>
                            <td class="orangeBold12" align="right" style="cursor:pointer;" onClick="blogDetail('<sap:write property="AI_UUID"/>')">查看全文</td>
                            <td width="10"></td>
                        </tr>
                        <tr><td height="20" colspan="5"> <div style="border-top:1px dotted #CCCCCC;height: 1px;overflow:hidden; width:98%;"></div></td></tr>
	                    </sap:Article>
	         			</sap:ArticleList>
                    </table>
                </td>
            </tr>
            <tr><td height="20"></td></tr>
            </table>
            </td>
        </tr>
        </table>
        
        <!--中间主信息展示区-->
        </td>
        <td width="10"></td>
    	<td width="190" valign="top" align="left"><%@include file="../include/jsp/quan/topicQuanDiscuss.jsp"%></td>
        </tr>
	</table>
    </td>
</tr>
<tr>
	<td>
    <table border="0" cellpadding="0" cellspacing="0" width="1000" align="center">
        <tr><td height="10"></td></tr>
        <tr><td><hr color="#999999" size="1" width="100%"></td></tr>
        <tr>
            <td align="center" height="25">
            （C） 2011-2016 Schome.com.cn
            </td>
        </tr>
        <tr>
            <td align="center" height="25">&nbsp;</td>
        </tr>
    </table>
    </td>
</tr>
</table>
<br>

<br><br>


</form>
</body>
</html>

<script language="javascript">
function saveBlog(){
	content = KE.util.getPureData("editorContent")
	//htmlcontent = KE.html("editorContent");
	$("#CONTENT").val(content);
	document.frm.action="<%=path%>/article/articlelist?method=saveNewBlog";
	document.frm.submit();
}

function newBlog(){
	window.open('<%=path%>/article/articlelist?method=newBlog',"新建博客","")
}


function editBlog(bloguuid){
	window.open("<%=path%>/article/articlelist?method=editBlog&bloguuid="+bloguuid,"修改文章","");
}

function deleteBlog(bloguuid){
	document.frm.action="<%=path%>/article/articlelist?method=deleteBlog&bloguuid="+bloguuid;
	document.frm.submit();
}

function blogDetail(bloguuid){
	document.frm.action="<%=path%>/article/articlelist?method=blogDetail&bloguuid="+bloguuid;
	document.frm.submit();
}

function seaBlogByTag(tagid){
	alert(tagid);
}

$(document).ready(function(){
 
});
</script>